package com.abc.mapper;

import com.abc.entity.Xuesheng;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface XueshengMapper {

    //新增学生
    @Insert("insert into xuesheng(xingming,nianling,zhuanye,banji) values(#{xingming},#{nianling},#{zhuanye},#{banji})")
    int insertXuesheng(Xuesheng xuesheng);
    //根据 xingming 查询单条记录
    @Select("select * from xuesheng where xingming=#{xingming}")
    Xuesheng findByXueshengXingming(String xingming);
    //查询所有的记录
    @Select("select * from xuesheng")
    List<Xuesheng> findAllXuesheng();

}
